/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.cms.entity;

import com.thinkgem.jeesite.modules.cms.entity.Category;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 视频Entity
 * @author 夏国强
 * @version 2016-05-30
 */
public class ExVideos extends DataEntity<ExVideos> {
	
	private static final long serialVersionUID = 1L;
	private Category category;		// 栏目编号
	private String title;		// 视频名称
	private String color;		// 标题颜色
	private String image;		// 链接图片
	private String href;		// 链接地址
	private String weight;		// 权重，越大越靠前
	private Date weightDate;		// 权重期限
	private String content;		// 视屏内容描述
	private String video;		// 视频
	
	public ExVideos() {
		super();
	}

	public ExVideos(String id){
		super(id);
	}

	@NotNull(message="栏目编号不能为空")
	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}
	
	@Length(min=1, max=255, message="视频名称长度必须介于 1 和 255 之间")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(min=0, max=50, message="标题颜色长度必须介于 0 和 50 之间")
	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}
	
	@Length(min=1, max=255, message="链接图片长度必须介于 1 和 255 之间")
	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}
	
	@Length(min=0, max=255, message="链接地址长度必须介于 0 和 255 之间")
	public String getHref() {
		return href;
	}

	public void setHref(String href) {
		this.href = href;
	}
	
	@Length(min=0, max=11, message="权重，越大越靠前长度必须介于 0 和 11 之间")
	public String getWeight() {
		return weight;
	}

	public void setWeight(String weight) {
		this.weight = weight;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getWeightDate() {
		return weightDate;
	}

	public void setWeightDate(Date weightDate) {
		this.weightDate = weightDate;
	}
	
	@Length(min=0, max=255, message="视屏内容描述长度必须介于 0 和 255 之间")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@Length(min=1, max=1024, message="视频长度必须介于 1 和 1024 之间")
	public String getVideo() {
		return video;
	}

	public void setVideo(String video) {
		this.video = video;
	}
	
}